<template>
    <div>
 <van-tabbar v-model="active">
    <van-tabbar-item icon="home-o" url="/">首页</van-tabbar-item>
    <van-tabbar-item icon="search" url="#/types">分类</van-tabbar-item>
    <van-tabbar-item icon="friends-o" url="#/video">视频</van-tabbar-item>
    <van-tabbar-item icon="setting-o" url="#/cart">购物车</van-tabbar-item>
    <van-tabbar-item icon="setting-o" url="#/my">我的</van-tabbar-item>
</van-tabbar>
    </div>
</template>
<script>
import { Tabbar, TabbarItem } from 'vant';
import Vue from 'vue';
Vue.use(Tabbar);
Vue.use(TabbarItem);
export default {
    data(){
        return{
            // active:this.$store.state.active
        }
    },
    methods: {
        },
    computed:{
        active:{
            get(){
                return this.$store.state.active
            },
            set(val){
                this.$store.commit('changeActive',val)
            }
        }

    }
   
}
</script>